# pragma once

#include "Window.h"
#include "Matrix4.h"
#include "Vector3.h"
#include "Mouse.h"

class Camera {
public :
	Camera ( void ){
		yaw = 0.0f ;
		pitch = 0.0f ;

		FreeView = true;
		FollowViewVector = Vector3(1,1,1);
		ObjectPos = Vector3(0,0,0);
	};

	Camera ( float pitch , float yaw , Vector3 position ){
		this -> pitch = pitch ;
		this -> yaw = yaw ;
		this -> position = position ;
	}

	~Camera ( void ){};

	void UpdateCamera ( float msec = 10.0f );

	Matrix4 BuildViewMatrix ();

	Vector3 GetPosition () const { return position ; }
	void SetPosition ( Vector3 val ) { position = val ; }

	float GetYaw () const { return yaw ; }
	void SetYaw ( float y ) { yaw = y ; }

	float GetPitch () const { return pitch ;}
	void SetPitch ( float p ) { pitch = p ; }

	Vector3 GetForwardVector();
	Vector3 GetForwardVectorYaw();

	void	SetFollowViewVector(Vector3 v)	{ FollowViewVector = v;}
	Vector3 GetFollowViewVector()			{ return FollowViewVector;}

	void	SetObjectPos(Vector3 v)			{ ObjectPos = v;}
	Vector3 GetObjectPos()					{ return ObjectPos;}
	
	
	//Value
	float	Cyaw;
	float	Cpitch;

	Vector3 FollowViewVector;
	Vector3 ObjectPos;
	bool	FreeView;

	//****Camera Shift*****//
	float	CameraShiftAmong;
	Vector3	ModelLeft;

	
	void	SetCameraShiftAmong(float y)	{ CameraShiftAmong = y ; }
	float	GetCameraShiftAmong()			{ return CameraShiftAmong ; }

	void	SetModelLeft(Vector3 v)			{ ModelLeft = v;}
	Vector3	GetModelLeft()					{ return ModelLeft ; }


protected :
	bool zoom_off;
	float yaw ;
	float pitch ;
	Vector3 position ; // Set to 0 ,0 ,0 by Vector3 constructor ;)
};
